// platforminfo.h
#ifndef PLATFORMINFO_H
#define PLATFORMINFO_H

#include <QObject>
#include <QString>

class PlatformInfo : public QObject
{
    Q_OBJECT
    Q_PROPERTY(QString platformName READ platformName CONSTANT)
    Q_PROPERTY(QString platformType READ platformType CONSTANT)
    Q_PROPERTY(QString qtVersion READ qtVersion CONSTANT)
    Q_PROPERTY(QString buildAbi READ buildAbi CONSTANT)
    Q_PROPERTY(QString kernelVersion READ kernelVersion CONSTANT)
    Q_PROPERTY(QString productType READ productType CONSTANT)
    Q_PROPERTY(QString prettyProductName READ prettyProductName CONSTANT)
    Q_PROPERTY(QString cpuArchitecture READ cpuArchitecture CONSTANT)

public:
    explicit PlatformInfo(QObject *parent = nullptr);

    QString platformName() const { return m_platformName; }
    QString platformType() const { return m_platformType; }
    QString qtVersion() const { return m_qtVersion; }
    QString buildAbi() const { return m_buildAbi; }
    QString kernelVersion() const { return m_kernelVersion; }
    QString productType() const { return m_productType; }
    QString prettyProductName() const { return m_prettyProductName; }
    QString cpuArchitecture() const { return m_cpuArchitecture; }

private:
    void detectPlatform();
    QString m_platformName;
    QString m_platformType;
    QString m_qtVersion;
    QString m_buildAbi;
    QString m_kernelVersion;
    QString m_productType;
    QString m_prettyProductName;
    QString m_cpuArchitecture;
};

#endif // PLATFORMINFO_H

